import request from '@/utils/request'

// // 获取小区名称
// export const getCommunityNameAPI = (data) => {
//   return request({
//     url: '/community',
//     method: 'get',
//     data
//   })
// }

// 获取收费项目管理列表
export const getExpensesListAPI = (params) => {
  return request({
    url: '/expenses/project',
    method: 'get',
    params
  })
}

// 新增收费项目
export const addProjectAPI = (data) => {
  return request({
    url: '/expenses/project',
    method: 'post',
    data
  })
}

// 修改收费项目数据回显
export const getProjectInfoAPI = (id) => {
  return request({
    url: '/expenses/project/' + id,
    method: 'get',
  })
}

// 修改收费项目
export const editProjectAPI = (data) => {
  return request({
    url: '/expenses/project/' + data.id,
    method: 'put',
    data
  })
}

// 删除收费项目
export const delProjectAPI = (id) => {
  return request({
    url: '/expenses/project/' + id,
    method: 'delete',
  })
}




// 获取收费明细管理列表
export const getDetailListAPI = (params) => {
  return request({
    url: '/expenses/index',
    method: 'get',
    params
  })
}

// 获取房产列表数据
export const ownerHouseListAPI = (params) => {
  return request({
    url: '/house/index',
    method: 'get',
    params
  })
}

// 新增明细
export const addDetailAPI = (data) => {
  return request({
    url: '/expenses/index',
    method: 'post',
    data
  })
}

// 修改明细的数据回显
export const getDetailInfoAPI = (id) => {
  return request({
    url: '/expenses/index/' + id,
    method: 'get',
  })
}

// 修改明细回显
export const editDetailAPI = (data) => {
  return request({
    url: '/expenses/index/' + data.id,
    method: 'put',
    data
  })
}

// 删除回显
export const delDetailAPI = (id) => {
  return request({
    url: '/expenses/index/' + id,
    method: 'delete',
  })
}


// 获取栋数
export function buildingListApi(data) {
  return request({
    url: "/house/building?0=" + data,
    method: "get",
  });
}

// 获取成员
export function memberListApi() {
  return request({
    url: "/owners/member",
    method: "get",
  });
}

